package com.sl.au.service;

import java.util.List;
import java.util.Map;

import com.sl.au.entity.AfterSaleOutHouse;
import com.sl.au.entity.AfterSaleTicketTrance;
import com.sl.au.repository.AfterSaleOutHouseRepository;
import com.sl.au.repository.AfterSaleTicketTranceRepository;

public interface AfterSaleOutHouseService extends BaseService {
	AfterSaleOutHouseRepository getRepository();
	
	AfterSaleTicketTranceRepository getTicketTranceRepository();
	/**
	 * 获取售后外勤的数据
	 * @param key 查询条件
	 * @return
	 */
		List<AfterSaleOutHouse> getOutHouseTicket(int start, int length, Map<String,String> condition, String orderName, String dir);
		/**
		 * 获取当前登录人售后外勤的数据
		 * @param key 查询条件
		 * @return
		 */
		List<AfterSaleOutHouse> getMyOutHouseTicket(int start, int length, Map<String,String> condition, String orderName, String dir);
		/**
		 * 获取当前服务单跟踪数据
		 * @param key 查询条件
		 * @return
		 */
		List<AfterSaleTicketTrance> getTicketTrance(int start, int length, Map<String,String> condition, String orderName, String dir);
		/**
		 * 获取当前服务单所有跟踪人员跟踪数据
		 * @param key 查询条件
		 * @return
		 */
		List<AfterSaleOutHouse> getTicketTrancePerson(int start, int length, Map<String,String> condition, String orderName, String dir);
		
		/*
		 * 获得服务单的所有派遣单的完成状况：全部完成返回0，否则返回1
		 */
		int getTicketFinishState(String ticketId);
		
		/*
		 * 获得派遣单的所有活动
		 */
		List<AfterSaleTicketTrance> findAllTrance(int start, int length, Map<String, String> condition,
				String orderName, String dir);
		
		List<AfterSaleOutHouse> findAllNoRecivedOuts(int start, int length,String ticketId);

		List<AfterSaleOutHouse> getAllOutHouseTicket(int start, int length, Map<String, String> condition, String orderName, String dir);

		List<AfterSaleTicketTrance> findAllTranceBykey(int start, int length, Map<String, String> condition, String orderName, String dir);
}
